package com.project.fiveCerealsSavoury.transfer;

import java.sql.Timestamp;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import com.project.fiveCerealsSavoury.domain.OrderState;

/**
 * 添加到购物车
 * @author Administrator
 *
 */
public class AddOrder {
	/**
	 * 编号
	 */
	private Integer id;
	/**
	 * 货物名称
	 */
	@NotEmpty(message="不能为空")
	private String goodName;
	/**
	 *货物现价
	 */
	@NotNull(message="不能为空")
	private Double nowPrice;
	/**
	 * 数量
	 */
	@NotNull(message="不能为空")
	private Integer count;
	/**
	 * 重量hjhj
	 */
	@NotNull(message="不能为空")
	private Double weight;
	/**
	 * 时间
	 * @return
	 */
	@NotNull(message="时间不能为空")
	private Timestamp orderTime;
	/**
	 * 订单状态
	 */
	private OrderState orderState;
	/**
	 * 用户ID
	 */
	@NotBlank(message="用户ID不能为空")
	private Integer userId;
	
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getGoodName() {
		return goodName;
	}
	public void setGoodName(String goodName) {
		this.goodName = goodName;
	}
	public Double getNowPrice() {
		return nowPrice;
	}
	public void setNowPrice(Double nowPrice) {
		this.nowPrice = nowPrice;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	public Double getWeight() {
		return weight;
	}
	public void setWeight(Double weight) {
		this.weight = weight;
	}
	
	public Timestamp getOrderTime() {
		return orderTime;
	}
	public void setOrderTime(Timestamp orderTime) {
		this.orderTime = orderTime;
	}
	public OrderState getOrderState() {
		return orderState;
	}
	public void setOrderState(OrderState orderState) {
		this.orderState = orderState;
	}
	@Override
	public String toString() {
		return "AddOrder [id=" + id + ", goodName=" + goodName + ", nowPrice=" + nowPrice + ", count=" + count
				+ ", weight=" + weight + ", orderTime=" + orderTime + ", orderState=" + orderState + ", userId="
				+ userId + "]";
	}
	
	
}
